Skip to content

fix(screening): production pass round 1, what the council and seven walkers found - #1619

Merged
sickerine merged 3 commits into
devfrom
fix/screening-production-pass-1
Nov 28, 2026
Merged

sickerine merged 3 commits into
devfrom
fix/screening-production-pass-1

Conversation

@sickerine

Copy link
Copy Markdown
Collaborator

Round 1 of the screening's production pass: seven walkers carried whole screenings to the end on different set-ups (solo with a model, a team with a guest from email, an organization with a weekly check and models as votes, keyboard only with uploads and DOIs, Arabic on a phone, a screening at the plan's cap from four sources), four code reviewers and two visual reviewers covered the whole feature, and a duplication reviewer read it for copies. This PR fixes what they found that was broken, and the unexpected findings that made sense.

Data kept and shown right

  • A rule change that asked for fewer people could mark one closed place both removed and reopened; bookkeeping then rolled back its whole batch. Each place is now one or the other, and a paper that can't be bookkept is tried alone.
  • Under "first vote decides", the reason comes from the vote that settled the paper (decidingVotes, shared by the rule and settling).
  • Excluded papers by reason and included papers by source come from the kept counts. The progress row's hand-kept copies go, with them the 52-reason limit that could stop a batch from settling.
  • A model's vote shows as it was counted; its reason follows its answers as its decision does. Answers given to a cast vote keep its cast time and its "Vote again".
  • The whole record lists every reviewer, those whose votes stopped counting included. Activity says how many settled papers were checked again. Papers gives a hand-settled exclusion's reason.
  • convex/screening/audit.ts checks a screening's papers, votes, cards and counts against one another: run by the rules test after every mid-course change (117 cases, now with a paper everyone excludes) and by hand on a live screening.

The plan's cap and sources

  • One paper limit, the plan's within 5,000. Withdrawn papers are counted in the same write, so papers brought back can't take the same room twice. A full screening asks no source for another page, and once a removed source's papers have left, sources stopped at the cap read again to fill the room.
  • A source read again after a change ignores its earlier reading's answers. A Zotero range inside a collection with subcollections starts at its first record. An outage at OpenAlex or a registry stops the reading with why instead of leaving papers out. Restored papers reopen a finished screening.
  • A source or a drop of PDFs takes only files the person added in that workspace; the whole record leaves file handles out.

Speed

  • Papers lists narrowed in added order, and counts narrowed two ways, read the small cards through an index per filter.
  • What waits for the person (rail, Needs you, other workspaces, emails) reads their own votes and the papers in conflict, never the running counts.
  • Checks, the latest batch and the hidden-votes test no longer read whole papers or the progress row. The Settings preview counts again only for a change that can move a paper.

On the pages

  • To do, Done, the bar and the Screen tab move together after a vote (useUnheardMoves in the frame).
  • One rule for skeletons or an empty list (listDraws), one "another reason" form, one CSV cell writer with the formula guard, one flow count for the Overview, the diagram and Methods.
  • Fixed: "Not in this list now" on a voted paper in Done, Activity links landing elsewhere in Settings, stars where nothing earns a point, the bare kappa figure, open work on the Finished tab, "Settled by" where nothing settles by hand, the new form's preview counts, the "at the start" row after a source is removed.

Migration

After deploy: npx convex run migrations/screeningFacets:clearCopies clears the old totals; a later PR drops the two fields from the schema.

Checks

npx tsc --noEmit, check:ui-rules, check:convex-rules, check:module-weight, check:user-actions; Vitest on convex/screening, lib/screening, tests/hooks and the exports (420 passed); the size cases in convex/limits/maxSizeScreening.test.ts (5 passed). A cross-family review (GPT-6.2 Sol) of the first commit found 13 items; the second commit fixes ten, and the rest are noted for round 2.

…alkers found

Data kept and shown right:
- A rule change that asked for fewer people could mark one closed place both
  removed and reopened, and the paper's bookkeeping then rolled back its whole
  batch. Each place is now one or the other, and a paper that can't be
  bookkept is tried alone, so only it waits.
- Under "first vote decides" the reason now comes from the vote that settled
  the paper, the same votes the rule reads (lib/screening/rules.ts
  `decidingVotes`).
- Excluded papers by reason and included papers by source are read from the
  kept counts. The progress row's hand-kept copies go, and so does the limit
  of 52 reasons that could stop a batch from settling.
- A model's vote shows as it was counted, so pages, filters, counts and files
  agree on a paper whose result was held through a change of criteria.
- The whole record lists every reviewer, those whose votes stopped counting
  included, and its preview counts the same.
- Activity says how many settled papers were checked again. Papers gives the
  reason a hand-settled exclusion was made for. Answering a criterion on a
  paper asked for again keeps it in Vote again until a new vote.
- One audit (convex/screening/audit.ts) checks a screening's papers, votes,
  cards and counts against one another: run by the rules test after every
  change made mid-course, and by hand on a live screening.

The plan's cap and sources:
- One paper limit, the plan's within 5,000, for the form and the reading. Papers
  taken out with their source are counted in the same write, so papers
  brought back can't take the same room twice. A full screening asks no
  source for another page.
- A source read again after a change ignores the answers of its earlier
  reading. A Zotero range inside a collection with subcollections starts at
  its first record. An outage at OpenAlex or a DOI registry stops the reading
  with why instead of leaving papers out.
- A source or a drop of PDFs takes only files the person added in that
  workspace. The whole record leaves file handles out.

Speed:
- Papers lists narrowed in added order, and counts narrowed two ways, read the
  small cards through an index for each filter.
- What waits for the person (the rail, Needs you, other workspaces, emails) is
  read from their own votes and the papers in conflict, never from the
  screening's running counts.
- Checks, the latest batch, and whether votes are hidden no longer read whole
  papers or the progress row. The Settings preview counts again only for a
  change that can move a paper.

On the pages:
- To do, Done, the bar and the Screen tab move together after a vote.
- One rule for skeletons or an empty list on the Screening list, Papers and
  Screen; one "another reason" form on Screen and Papers; one CSV cell writer.
- "Not in this list now" no longer shows for a voted paper in Done. Activity's
  links land on the Settings part they name. Included papers show no stars
  where nothing earns a point. Agreement is named Cohen's kappa. The Finished
  tab leaves out open work from other workspaces.

Also: the old Screen all answer and stop refuse a screening with reviewers,
extraction takes a screening's PDF-only papers as their file, a check that
couldn't read a source doesn't say it found nothing new, and a guest isn't
told the name of another workspace's screening ahead of theirs.
- Answers given to a cast vote keep its cast time, which "first vote decides"
  reads, and an Undo changed since in another tab leaves the counts it moved.
- Counts narrowed by a reviewer and a source match their votes to cards read
  in one range, inside a transaction's index ranges on a 5,000-paper screening.
- A reading stopped by a full screening keeps the source's last figures. Once a
  removed source's papers have left, sources stopped at the cap read again to
  fill the room, a source added in the same save among them.
- Papers brought back by a check reopen a finished screening.
- A model's exclusion reason follows its answers, as its decision does.
- The audit compares the kept reason counts with the papers, and the rules test
  settles a paper everyone excludes.
- Papers keeps the votes and the settler's note beside a hand-settled reason.
- The last hand-kept copy of included papers by source goes.
- Other fixes from round 1 walkers: a whole source asked for as a range reads
  nothing again, criterion keys are listed only where answers can be given,
  and a model's row in Settings starts on one line with its mark.
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d75f6e12-c8cc-474e-9260-968712505f16
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T14:18:16.680319Z 74b8ff1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74b8ff1bdf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread convex/screening/voting.ts Resolved
Comment thread components/screening/screen.tsx Resolved
Comment thread convex/screening/gathering.ts Resolved
Comment thread convex/extraction/actions.ts Resolved
- Extraction takes a copy of a screening paper's PDF: deleting the extraction
  deletes its copy, never the screening's file.
- A vote keeps when it was cast apart from when it was last changed: answers
  joining it leave its cast time for "first vote decides", and an Undo kept
  from before the change is refused.
- A reading a full screening stopped before it gave anything leaves the source
  as its last whole reading left it, its lists of merged and left-out records
  included.
- An Undo pressed while its vote is still saving, which the server then refuses,
  moves the counts back once.
@sickerine
sickerine merged commit 7270174 into dev Nov 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant